<?
$this->headScript()->appendFile( $this->config->js_url . "admin/admin.js" );
$this->headLink()->appendStylesheet( $this->config->css_url . "admin/admin.css" );
?>
<?= $this->doctype('XHTML1_STRICT') ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ADMIN Page: <?= $this->headTitle() ?></title>

<!--  TODO: For now until I can get something better -->
<script type="text/javascript">
   var imageUrl = '<?= $this->config->img_url ?>';
   var cssUrl = '<?= $this->config->css_url ?>';
   var jsUrl = '<?= $this->config->js_url ?>';
   var yuiUrl = '<?= $this->config->yui_url ?>';
   
   loadingImg = new Image()
   loadingImg.src = imageUrl + 'loading_16.gif';
   deleteImg = new Image()
   deleteImg.src = imageUrl + 'delete_16.png';
</script>

<script src="<?= $this->config->yui_url ?>yuiloader/yuiloader-beta.js"></script>
<script type="text/javascript">
   // Instantiate and configure Loader:
   var loader = new YAHOO.util.YUILoader({
   
      require: ['<?= join("', '", $this->yui_libraries); ?>'],
      base: '<?= $this->config->yui_url ?>',
      //filter: 'DEBUG',
      
      loadOptional: true,
      allowRollup: true,
      
      // The function to call when all script/css resources have been loaded
      onSuccess: function() {
       
         var myCollapsed = new YAHOO.widget.LogReader();
         myCollapsed.collapse();
         myCollapsed.setTitle("Collapsed LogReader");

         container = document.getElementById('yui-loader-container');
         container.wait = 
               new YAHOO.widget.Panel("wait",  
                  { width:"240px", 
                    fixedcenter:true, 
                    close:false, 
                    draggable:false, 
                    zindex:4,
                    modal:true,
                    visible:false
                  } 
               );
         
         container.wait.setHeader("Processing, please wait...");
         container.wait.setBody('<img src="/tools/images/rel_interstitial_loading.gif" />');
         container.wait.render(document.body);
       }
   });

<? if ( ! empty($this->loader_extras) ):
   // Include any extra modules.
   echo $this->partialLoop('elements/loader-modules.js', $this->loader_extras); ?>

   loader.require('<?= join("', '", array_keys($this->loader_extras))?>');
<?   endif; ?>
   
   
   // Load the files using the insert() method. The insert method takes an optional
   // configuration object, and in this case we have configured everything in
   // the constructor, so we don't need to pass anything to insert().
   loader.insert();
</script>


<?= $this->headLink() ?>

<?= $this->headStyle() ?>

<?= $this->headScript() ?>

</head>
<body class="yui-skin-sam">
<!--  Placeholder div for "Loading" popup -->
<div id="yui-loader-container"></div>

   <div id="nav"><?= $this->placeholder('nav') ?>
      <ul>
         <li><a href="/admin/toon">Toon Admin Index</a> (need to change)</li>
         <li><a href="/admin/toon/stats">Stats Admin</a></li>
         <li><a href="/admin/toon/guilds">Guilds Admin</a></li>
         <li><a href="/admin/toon/roles">Roles Admin</a></li>
         <li><a href="/admin/toon/raceclass">Race / Class Admin</a></li>
         <li><a href="/admin/zone">Zone Admin</a></li>
      </ul>
   </div>
   
   <div id="content">
   
<?= $this->layout()->content ?>

   </div>



<script type="text/javascript">
// Define all required YUI classes within this page.
   var signature = '<?= $this->signature ?>';
 
</script>
</body>
</html>